#pragma once

#include <string>
#include <sstream>

#include "panda_export.hpp"

namespace Panda {
    class PANDA_EXPORT Execption {
    public:
        explicit Execption( const char* file, int line, std::string error );
        virtual ~Execption();
        virtual std::string ToString() {
            return ss.str();
        }
        template <class T>
        Execption& operator << ( T& v ) {
            ss << v;
            return *this;
        }
    private:
        std::stringstream ss;
    };

    #define ThrowPandaExecption Execption(__FILE__,__LINE__,"")
}